package com.snail.poker.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import org.apache.struts2.json.annotations.JSON;

import com.snail.poker.uitls.DateUtil;
import com.snail.poker.uitls.excel.ExcelAnnotation;

/**
 * 牌局
 * 
 * @author Snail
 * 
 */
public class Innings {
	/**
	 * 操作员
	 */
	@ExcelAnnotation(id = 0, name = "操作员", width = 30)
	private String memberName;
	/**
	 * 投保金额
	 */
	@ExcelAnnotation(id = 1, name = "投保金额", width = 30)
	private double insure;
	/**
	 * 玩家数
	 */
	@ExcelAnnotation(id = 2, name = "玩家数", width = 30)
	private int players;
	/**
	 * 赢的概率
	 */
	@ExcelAnnotation(id = 3, name = "赢的概率", width = 30)
	private double win;
	/**
	 * 输的概率
	 */
	@ExcelAnnotation(id = 4, name = "输的概率", width = 30)
	private double lose;
	/**
	 * 平的概率
	 */
	@ExcelAnnotation(id = 5, name = "平的概率", width = 30)
	private double tie;
	/**
	 * 对手平的概率
	 */
	@ExcelAnnotation(id = 6, name = "对手平的概率", width = 30)
	private double oppTie;
	/**
	 * 赔率
	 */
	@ExcelAnnotation(id = 7, name = "赔率", width = 30)
	private double odds;
	@ExcelAnnotation(id = 8, name = "创建时间", width = 30)
	private Date createTime;
	private String createIp;
	private Equipment equipment;
	private Common common;
	private Set<Opponents> opponents;
	private Set<Rank> ranks;
	private int inningSn;

	public Innings() {
		super();
		// TODO Auto-generated constructor stub
		this.inningSn = 0;
		this.players = 0;
		this.memberName = "";
		this.win = 0;
		this.lose = 0;
		this.tie = 0;
		this.oppTie = 0;
		this.odds = 0;
		this.insure = 0;
		this.createTime = DateUtil.getCurrDate();
		this.createIp = "127.0.0.1";
		this.equipment = new Equipment();
		this.common = new Common();
		this.opponents = new HashSet<Opponents>();
		this.ranks = new HashSet<Rank>();
	}

	public Innings(int inningSn, int players, String memberName, double win,
			double lose, double tie, double oppTie, double odds, double insure,
			Date createTime, String createIp, Equipment equipment,
			Common common, Set<Opponents> opponents, Set<Rank> ranks) {
		super();
		this.inningSn = inningSn;
		this.players = players;
		this.memberName = memberName;
		this.win = win;
		this.lose = lose;
		this.tie = tie;
		this.oppTie = oppTie;
		this.odds = odds;
		this.insure = insure;
		this.createTime = createTime;
		this.createIp = createIp;
		this.equipment = equipment;
		this.common = common;
		this.opponents = opponents;
		this.ranks = ranks;
	}

	public int getInningSn() {
		return inningSn;
	}

	public void setInningSn(int inningSn) {
		this.inningSn = inningSn;
	}

	public int getPlayers() {
		return players;
	}

	public void setPlayers(int players) {
		this.players = players;
	}

	public String getMemberName() {
		return memberName;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}

	public double getWin() {
		return win;
	}

	public void setWin(double win) {
		this.win = win;
	}

	public double getLose() {
		return lose;
	}

	public void setLose(double lose) {
		this.lose = lose;
	}

	public double getTie() {
		return tie;
	}

	public void setTie(double tie) {
		this.tie = tie;
	}

	public double getOppTie() {
		return oppTie;
	}

	public void setOppTie(double oppTie) {
		this.oppTie = oppTie;
	}

	public double getOdds() {
		return odds;
	}

	public void setOdds(double odds) {
		this.odds = odds;
	}

	public double getInsure() {
		return insure;
	}

	public void setInsure(double insure) {
		this.insure = insure;
	}

	@JSON(format = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateIp() {
		return createIp;
	}

	public void setCreateIp(String createIp) {
		this.createIp = createIp;
	}

	public Equipment getEquipment() {
		return equipment;
	}

	public void setEquipment(Equipment equipment) {
		this.equipment = equipment;
	}

	public Common getCommon() {
		return common;
	}

	public void setCommon(Common common) {
		this.common = common;
	}

	public Set<Opponents> getOpponents() {
		return opponents;
	}

	public void setOpponents(Set<Opponents> opponents) {
		this.opponents = opponents;
	}

	public Set<Rank> getRanks() {
		return ranks;
	}

	public void setRanks(Set<Rank> ranks) {
		this.ranks = ranks;
	}
}
